package com.youlu.campus.base.common;

import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

@Slf4j
public class Constants {
    /**
     * 类型,before:之前活动类型,contest-plus:竞赛类,
     * h5-plus:h5新版,
     * qq-mini-plus:小程序活动plus竞赛类
     * qq-mini-plus-noncontest:小程序活动plus非竞赛类
     * qq-mini-zhongqing-contest 中青小程序活动竞赛类型
     * qq-mini-zhongqing-noncontest 中青小程序活动非竞赛类型
     * h5++:新版H5,最终版
     */

    static void init() {
        ACTIVITY_V2.add("h5++");
        ACTIVITY_V2.add("qq-mini-zhongqing-noncontest");
        ACTIVITY_V2.add("qq-mini-zhongqing-contest");
        ACTIVITY_V2.add("qq-mini-plus-noncontest");
        ACTIVITY_V2.add("qq-mini-plus");
        ACTIVITY_V2.add("contest-plus");
    }

    /**
     * 系统过期时间:2099-12-30 00:00:00
     */

    public static final Long PACKAGE_SYSTEM_EXPIRE_TIME = 4102243200000L;
    // 系统默认0号用户
    public static final String SYSTEM_ZERO_USER = "0";
    public static final String SYSTEM_ID = "SYSTEM";
    public static final String SYSTEM_NAME = "[系统]";
    public static final int PLAT_SDK = 1;
    public static final int PLAT_WEIXIN = 2;
    public static final int PLAT_WEIBO = 3;
    public static final int PLAT_WAP = 4;
    public static final int PLAT_WEB = 5;
    /**
     * 系统用户数据统计缓存前缀
     */
    public static final String SYSTEM_USER_COUNTER_ID_RPEFIX = "youlu:system:runtime:tenantId:%s";
    /**
     * 系统用户数据统计缓存前缀,活跃用户
     */
    public static final String SYSTEM_USER_COUNTER_ID_DAU_RPEFIX = "youlu:system:runtime:tenantId:%s:dau:time:%s";
    /**
     * 系统用户数据统计缓存前缀,新用户
     */
    public static final String SYSTEM_USER_COUNTER_ID_NEW_USER_RPEFIX = "youlu:system:runtime:tenantId:%s:new-user:time:%s";
    /**
     * 系统用户数据统计缓存前缀,新用户
     */
    public static final String SYSTEM_USER_COUNTER_ID_ALL_USER_RPEFIX = "youlu:system:runtime:tenantId:%s:all-user";

    /**
     * 系统用户数据统计缓存前缀,新建小组
     */
    public static final String SYSTEM_USER_COUNTER_ID_NEW_GROUP_RPEFIX = "youlu:system:runtime:tenantId:%s:new-group:time:%s";
    /**
     * 系统用户数据统计缓存前缀,解散小组
     */
    public static final String SYSTEM_USER_COUNTER_ID_DISMISS_GROUP_RPEFIX = "youlu:system:runtime:tenantId:%s:dismiss-group:time:%s";
    /**
     * 系统用户数据统计缓存前缀,发布打卡数
     */
    public static final String SYSTEM_PUBLISH_CLOCK_IN_RPEFIX = "youlu:system:runtime:tenantId:%s:publish-clock-in:time:%s";
    /**
     * 系统用户数据统计缓存前缀,发布打卡人数
     */
    public static final String SYSTEM_PUBLISH_CLOCK_IN_USER_COUNT_RPEFIX = "youlu:system:runtime:tenantId:%s:publish-clock-in-user-count:time:%s";

    /**
     * 系统活跃组员缓存前缀
     */
    public static final String SYSTEM_ACTIVE_GROUP_MEMBER_RPEFIX = "youlu:system:runtime:tenantId:%s:active-group-member:time:%s";
    /**
     * 系统新增组员缓存前缀
     */
    public static final String SYSTEM_NEW_GROUP_MEMBER_RPEFIX = "youlu:system:runtime:tenantId:%s:new-group-member:time:%s";
    /**
     * 系统活跃组长缓存前缀
     */
    public static final String SYSTEM_ACTIVE_GROUP_LEADER_RPEFIX = "youlu:system:runtime:tenantId:%s:active-group-leader:time:%s";
    /**
     * 系统新增组长缓存前缀
     */
    public static final String SYSTEM_NEW_GROUP_LEADER_RPEFIX = "youlu:system:runtime:tenantId:%s:new-group-leader:time:%s";
    /**
     * 系统新增动态缓存前缀
     */
    public static final String SYSTEM_NEW_TRENDS_LEADER_RPEFIX = "youlu:system:runtime:tenantId:%s:new-trends:time:%s";
    /**
     * 系统新增点赞缓存前缀
     */
    public static final String SYSTEM_NEW_THUMBSUPS_LEADER_RPEFIX = "youlu:system:runtime:tenantId:%s:new-thumbsUps:time:%s";
    /**
     * 系统新增动态缓存前缀
     */
    public static final String SYSTEM_NEW_COMMENTS_LEADER_RPEFIX = "youlu:system:runtime:tenantId:%s:new-comments:time:%s";
    /**
     * 组建任务-参与用户数缓存前缀
     */
    public static final String SYSTEM_TASK_PARTICIPATING_USERS_RPEFIX = "youlu:system:runtime:tenantId:%s:task-participating-users:time:%s";
    /**
     * 组建任务-激活用户数缓存前缀
     */
    public static final String SYSTEM_TASK_ACTIVE_USERS_RPEFIX = "youlu:system:runtime:tenantId:%s:task-active-users:time:%s";
    /**
     * 组建任务-授权用户数缓存前缀
     */
    public static final String SYSTEM_TASK_AUTHORIZE_USERS_RPEFIX = "youlu:system:runtime:tenantId:%s:task-authorize-users:time:%s";
    /**
     * 组建任务-加入小组缓存前缀
     */
    public static final String SYSTEM_TASK_JOIN_GROUP_RPEFIX = "youlu:system:runtime:tenantId:%s:task-join-group:time:%s";
    /**
     * 组建任务-首次缓存前缀
     */
    public static final String SYSTEM_TASK_FIRST_CLOCK_IN_RPEFIX = "youlu:system:runtime:tenantId:%s:task-first-clock-in:time:%s";

    /**
     * 打卡授权用户数-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_CLOCKIN_AUTHORIZER_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-clockin-authorize:time:%s";
    /**
     * 打卡创建/加入小组用户数-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_CLOCKIN_JOIN_GROUP_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-clockin-join-group:time:%s";

    /**
     * 打卡首次打卡用户数-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_CLOCKIN_FIRST_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-clockin-first:time:%s";
    /**
     * 组员转化-授权用户数-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_GROUP_MEMBER_AUTHORIZER_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-group-member-authorize:time:%s";

    /**
     * 组员转化-创建/加入组织用户数-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_GROUP_MEMBER_JOIN_GROUP_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-join-group:time:%s";
    /**
     * 组长转化,授权用户数-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_TEAM_LEADER_AUTHORIZER_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-team-leader-authorize:time:%s";
    /**
     * 组长转化,创建小组用户数-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_TEAM_LEADER_CREATE_GROUP_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-team-leader-create:time:%s";
    /**
     * 组长转化,完成组建任务-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_TEAM_LEADER_COMPLETE_TASK_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-team-leader-complete-task:time:%s";
    /**
     * 纸质证书-申请证书-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_APPEAL_CERTIFICATION_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-appeal-certification:time:%s";
    /**
     * 打卡授权用户数-缓存前缀
     */
    public static final String SYSTEM_CONVERSION_PAY_CERTIFICATION_PEFIX = "youlu:system:runtime:tenantId:%s:conversion-pay-certification:time:%s";
    /**
     * 活动新类型
     */
    public static List<String> ACTIVITY_V2 = new ArrayList<String>();
    /**
     * 活动新类型
     */
    public static String[] ACTIVITY__V2 = {"video", "h5-plus", "vote", "qq-mini-zhongqing-noncontest", "h5++",
            "qq-mini-zhongqing-contest", "qq-mini-plus-noncontest", "qq-mini-plus", "contest-plus"};
}
